<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<FitnessMVC.Data.UserProfile>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="infoMessage"><%= Html.Encode(ViewData["InfoMessage"]) %></div>
    <div class="errorMessage"><%= Html.Encode(ViewData["ErrMessage"]) %></div>
    
    <h1><%= Html.Encode(Model.FirstName) %> <%= Html.Encode(Model.LastName) %></h1>
    <label style="font-size: 10px;"><%=Html.ActionLink("Edit Profile", "Edit", new { id=Model.ProfileID }) %></label><br /><br />
    
    <% if (Model.ProfilePicID != null)
       { %>
        <img class="profilePic" src="/UserPicture/File/<%= Html.Encode(Model.ProfilePicID) %>" 
                alt="<%= Html.Encode(Model.FirstName) %> <%= Html.Encode(Model.LastName) %>" 
                title="<%= Html.Encode(Model.FirstName) %> <%= Html.Encode(Model.LastName) %>" />
    <% }
       else
       { %>
        <img class="profilePic" src="/Content/NoPic.jpg" 
                alt="<%= Html.Encode(Model.FirstName) %> <%= Html.Encode(Model.LastName) %>" 
                title="<%= Html.Encode(Model.FirstName) %> <%= Html.Encode(Model.LastName) %>" />
    <% } %>
        <p>
            Birth Date:
            <%= Html.Encode(String.Format("{0:MM-dd-yyyy}", Model.BirthDate)) %>
        </p>
        <p>
            Sex:
            <%= Model.Sex == 'm' ? "Male" : "Female" %>
        </p>       
        <p>
            Hometown: <br />
            <%= Html.Encode(Model.Hometown) %>
        </p>
        <p>
            About Me: <br />
            <%= Html.Encode(Model.AboutMe) %>
        </p>
        
        <p>
            Member Since:
            <%= Html.Encode(String.Format("{0:MM-dd-yyyy}", Model.MemberSince)) %>
        </p>
            
</asp:Content>

